import { TableColumnData } from '@arco-design/web-vue';

export const typeConfig = {
  blog: { label: '博客', color: 'blue' },
  project: { label: '项目', color: 'green' },
  achievement: { label: '成就', color: 'orange' },
  work: { label: '工作', color: 'purple' },
  life: { label: '生活', color: 'pink' },
  study: { label: '学习', color: 'cyan' },
};

export const columns: TableColumnData[] = [
  {
    title: '日期',
    dataIndex: 'date',
    align: 'center',
    sortable: { sortDirections: ['descend'] },
    width: 150,
  },
  {
    title: '类型',
    dataIndex: 'type',
    align: 'center',
    slotName: 'type',
    width: 200,
  },
  {
    title: '标题',
    dataIndex: 'title',
    align: 'center',
    width: 250,
  },
  {
    title: '描述',
    dataIndex: 'description',
    align: 'center',
    ellipsis: true,
    width: 600,
  },
  {
    title: '标签',
    dataIndex: 'tags',
    align: 'center',
    slotName: 'tags',
  },
  {
    title: '操作',
    align: 'center',
    dataIndex: 'operation',
    slotName: 'operation',
  },
];
